package com.newland.starpos.partner.bean.dto;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

public class DeviceQueryDTO {
	
	private static final DateFormat format = new SimpleDateFormat("yyyy-MM-dd");
	
	private int delivery;
	
	private String merchantName;
	
	private String deviceIds;
	
	private String startTime;
	
	private String endTime;

	public String getMerchantName() {
		return merchantName;
	}

	public void setMerchantName(String merchantName) {
		this.merchantName = merchantName;
	}

	public String getDeviceIds() {
		return deviceIds;
	}

	public void setDeviceIds(String deviceIds) {
		this.deviceIds = deviceIds;
	}

	public Date getStartTime() throws ParseException {
		if(startTime == null || startTime.length() < 1)
			return null;
		return format.parse(startTime);
	}

	public void setStartTime(String startTime) {
		this.startTime = startTime;
	}

	public void setEndTime(String endTime) {
		this.endTime = endTime;
	}

	public int getDelivery() {
		return delivery;
	}

	public void setDelivery(int delivery) {
		this.delivery = delivery;
	}
}
